﻿using Dispatcher.Core.Models;
using MiniFox.Infrastructure;
using MiniFox.Resources;
using System;
using System.ComponentModel.DataAnnotations;

namespace Dispatcher.Core.DingTalk.Models
{
    /// <summary>
    /// 
    /// </summary>
    public class DingTalkSendRequest : SendRequest
    {
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "发消息agent", ShortName = "发消息agent")]
        [Required(ErrorMessageResourceType = typeof(CommonMessages), ErrorMessageResourceName = "MSG_CommonRequired")]
        public string AccountName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public MessageType MessageType
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public string HeadTitle { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "链接地址", ShortName = "链接地址")]
        public string MessageUrl { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "图片", ShortName = "图片")]
        public string Image { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "表单数据", ShortName = "表单数据")]
        public IDictionary<string, string> FormData { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "状态描述", ShortName = "状态描述")]
        public string StatusDescription { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "状态栏背景色", ShortName = "状态栏背景色")]
        public string StatusColor { get; set; }
        public string Body { get; internal set; }
    }
    /// <summary>
    /// 
    /// </summary>
    public enum MessageType
    {
        Text,
        Link,
        OA
    }
}
